package com.ruicar.afs.cloud.apply.common.feign;

import com.ruicar.afs.cloud.common.core.security.vo.UserVo;
import com.ruicar.afs.cloud.common.core.util.IResponse;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * @description: 请求admin服务信息
 * @author: sijun.yu
 * @date: 2020/8/31 21:07
 */
@FeignClient(name = "Apply2AdminFeign", url = "${com.greatwall.services.wow-admin.url}")
public interface Apply2AdminFeign {

    /**
     * 通过用户查询渠道ID
     * @param userVo
     * @return
     */
    @ApiOperation("通过用户查询渠道ID")
    @PostMapping("/applyUser/getChannelIdByUsername")
    public IResponse getChannelIdByUsername(@RequestBody UserVo userVo, @RequestHeader Map<String, String> headers);

    /**
     * 通过用户查询用户详细信息
     * @param userVo
     * @param headers
     * @return
     */
    @ApiOperation("通过用户查询用户详细信息")
    @PostMapping("/applyUser/getUserInfoByUsername")
    public IResponse getUserInfoByUsername(@RequestBody UserVo userVo, @RequestHeader Map<String, String> headers);
    /**
     * 通过用户查询用户详细信息
     * @param userVo
     * @param headers
     * @return
     */
    @ApiOperation("通过用户id查询见证人身份证照片")
    @PostMapping("/applyUser/getUserFileByUserId")
    public IResponse getUserFileByUserId(@RequestBody UserVo userVo, @RequestHeader Map<String, String> headers);
}
